

import br.com.nooclix.salon.ui.util.MenuButton;
import br.com.nooclix.salon.ui.util.WindowsMessage;

import flash.events.MouseEvent;
import flash.net.URLRequest;
import flash.net.navigateToURL;

import mx.controls.Alert;
import mx.controls.Button;
import mx.events.CloseEvent;
import mx.rpc.events.ResultEvent;

public function homeClick():void{
	basePanel.reset();
}

public function startMenu():void{
	basePanel.addToBar(buttonHome());
	basePanel.createMenu();
	labelUserName.text = "A Nooclix lhe deseja, " + welcome();
}

private function buttonHome():Button{
	
	[Embed("br/com/nooclix/salon/ui/icons/home.png")]
	var icon:Class;
	
	var button:MenuButton = new MenuButton("Página Inicial");
	button.height = 36;
	button.setStyle("icon",icon);
	button.addEventListener(MouseEvent.CLICK, function ():void{
		homeClick();
	});
	
	return button;
	
}

private function openNooclixSite():void{
	var url:URLRequest = new URLRequest("http://www.nooclix.com.br");
	navigateToURL(url, "_blank");

}